# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: demo01.py
@time: 2021/01/25
"""
class MyNode:
    __slots__ = ['val', 'next']

    def __init__(self,val):
        self.val = val

import os
import re
# from sys import path
import sys

def readHashNone(path):
    ...
    if not os.path.exists(path):
        return
    compile = re.compile(r'__hash__ = None')
    cls_comile = re.compile(r'class')
    res = []

    with open(path,mode='rt',encoding='utf-8') as f:
        ...
        class_name = ''
        for line in f:
            ...
            if cls_comile.match(line):
                class_name = line
            if class_name and compile.search(line):
                ...
                res.append((class_name.strip(),line.strip()))
    return res


if __name__ == '__main__':
    pass
    list
    print(sys.path)
    path = '/Users/tgy/Library/Caches/JetBrains/PyCharmCE2020.3/python_stubs/-1199943126/builtins.py'
    """
    class bytearray(object):
    class dict(object):
    class list(object):
    class set(object):
    class slice(object):
    """
    for cls,_ in readHashNone(path):
        print(cls)
    # print(hash(MyNode(12)))
    # dic = { MyNode(12):'1',['1']:'11'}

